﻿using DTOs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RBAC.Domain.Service.Interfae
{
    public interface IMenuService
    {
        /// <summary>
        /// 添加菜单
        /// </summary>
        /// <param name="menu"></param>
        /// <returns></returns>
        Task<int> AddMenu(Menu menu);
        /// <summary>
        /// 修改菜单
        /// </summary>
        /// <param name="menu"></param>
        /// <returns></returns>
        Task<int> UpdateMenu(Menu menu);
        /// <summary>
        /// 显示全部菜单
        /// </summary>
        /// <returns></returns>
        Task<List<Menu>> GetMenuList();
        /// <summary>
        /// 反填菜单
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Menu> GetMenuValue(int id);
        /// <summary>
        /// 显示菜单
        /// </summary>
        /// <param name="pid"></param>
        /// <returns></returns>
        Task<List<MenuDTOs>> GetMenus();
        /// <summary>
        /// 删除前取值(判断是否有子集)
        /// </summary>
        /// <param name="Pid"></param>
        /// <returns></returns>
        Task<int> DelMenu13(int ids);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Pid"></param>
        /// <returns></returns>
        Task<int> DelMenu2(int ids);
        /// <summary>
        /// 显示菜单（根据用户ID查菜单）
        /// </summary>
        /// <param name="pid"></param>
        /// <returns></returns>
        Task<PageDto<MenuDTOs>> GetMenusUserId(int uid, int pageSize, int pageIndex);

    }
}
